﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace comm.objst
{
    [Serializable]
    public class UnitInfo
    {
        private string _unitId = null;
        public string UnitId
        {
            get
            {
                if (_unitId == null)
                {
                    _unitId = "";
                }
                return _unitId;
            }
            set { _unitId = value; }
        }

        private string _dObjectId = null;
        public string DObjectId
        {
            get
            {
                if (_dObjectId == null)
                {
                    _dObjectId = "";
                }
                return _dObjectId;
            }
            set { _dObjectId = value; }
        }

        private string _name = null;
        public string Name
        {
            get
            {
                if (_name == null)
                {
                    _name = "";
                }
                return _name;
            }
            set { _name = value; }
        }

        public UnitInfo()
        {
        }

        public UnitInfo(TableUnit tableUnit)
        {
            UnitId = tableUnit.UnitId;
            DObjectId = tableUnit.DObjectId;
            Name = tableUnit.Name;
        }
    }

    [Serializable]
    public class UnitReadyInfo
    {
        public int Pos { get; set; }
        public UnitInfo Unit { get; set; }
    }
}
